import { createPinia } from 'pinia'
// import { createPersistedState } from 'pinia-plugin-persistedstate'

export const pinia = createPinia()

// pinia.use(
//   createPersistedState({
//     storage: localStorage,
//     beforeRestore: (context) => {
//       console.log('beforeRestore:', context)
//     },
//     afterRestore: (context) => {
//       console.log('afterRestore:', context)
//     }
//   })
// )

// export function createPersistedStateStorageKey(storeName: string) {
//   const PERSISTED_STATE_STORAGE_KEY_PREFIX = 'PERSISTED_STATE'
//   return `${PERSISTED_STATE_STORAGE_KEY_PREFIX}$${storeName}`
// }
